//
//  LookForVehicleViewController.m
//  WHB_cargo
//
//  Created by 徐国庆 on 15/12/9.
//  Copyright (c) 2015年 turing. All rights reserved.
//

#import "LookForVehicleViewController.h"
#import "vechileSearchViewController.h"
#import "shipSourceViewController.h"

@interface LookForVehicleViewController ()

@end

@implementation LookForVehicleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navtitle.text = @"首页";
    [self initWithView];
}

#pragma mark 导航栏左按钮点击事件
- (void)leftButtonAction:(UIButton *)button{
    vechileSearchViewController *vechileSearchVC = [[vechileSearchViewController alloc] init];
    [self.navigationController pushViewController:vechileSearchVC animated:YES];
}

#pragma mark 重写父类方法 防止返回上一个界面
- (void)popView{
}


#pragma mark 导航栏右按钮点击事件
- (void)rightButtonAction:(UIButton *)button{
    NSLog(@"右按钮");
    shipSourceViewController *shipSourceVC = [[shipSourceViewController alloc] init];
    [self.navigationController pushViewController:shipSourceVC animated:YES];
}

/**
 *  初始化视图
 */
- (void)initWithView{
    [self.leftButton setImage:[UIImage imageNamed:@"fdj"] forState:UIControlStateNormal];
    [self.leftButton addTarget:self action:@selector(leftButtonAction:) forControlEvents:UIControlEventTouchDown];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(30, 30, 30, 30);
    [self.view addSubview:button];
    button.backgroundColor = [UIColor redColor];
    
    [self.rightButton setImage:[UIImage imageNamed:@"sy"] forState:UIControlStateNormal];
    [self.rightButton addTarget:self action:@selector(rightButtonAction:) forControlEvents:UIControlEventTouchDown];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
